package DomainLayer;

public class Product{
    
    private String title;
    private String barCode;
    private double price;
    
    /**
     * @param title a product's title.
     * @param barCode the product's unique bar code.
     * @param price price of the product in the shop.
     */
    public Product(String title, String barCode, double price ){
        this.title = title;
        this.barCode = barCode;
        this.price=price;
    }
    
    public void setTitle(String title){
        this.title = title;
    }
    
    //return string an information abut product
    public String toString(){
        return "Product title: "+getTitle()+"\n Product code: "+getBarCode()+
        "\n Products price: "+getPrice()+"\n";
    }
    
    public String getTitle(){
        return title;
    }
    
    public String getBarCode(){
       return barCode;
    }
    
    public double getPrice()
    {
        return price;
    }
}